local CommonOHOH = _G.CommonOHOH;
local M = CommonOHOH.class.new(script,  script.Parent.BuffBase);

function M.new(self,...)
	return M(self,...);
end;
function M.ctor(self,bid,player,time,boost)
	
    self.boost=boost
    M.super.ctor(self,bid,player,time);
end;

function M.Use(self)
    self.Conn= self.player.HpValueMul2Event:Connect(function()
        return self.boost+1
    end)

   self:UpdateHp()

end

function M.UpdateHp(self)

    local attributeCtrl=self.player:GetComponent(CommonOHOH.load.Common_AttributeCtrl())
    if attributeCtrl.UpdateHp then
        attributeCtrl:UpdateHp()
    end
    
end

function M.dtor(self)
    if self.Conn then
        self.Conn:Disconnect()
        self.Conn=nil
    end
    self:UpdateHp()
	M.super.dtor(self);
end;




return M;
